﻿@model CodeCamp.Models.Volunteers.VolunteerIndexViewModel
@{
    @* ViewBag.RegistrationUrl set in code - SetSharedViewBagProperties *@
    ViewBag.Title = "";
    var indexPartial = "";
    if ((@Model != null) && (@Model.EventDisplayName != null))
    {
        ViewBag.Title = @Html.Encode(@Model.EventDisplayName + " | Volunteers");
    }
    else
    {
        ViewBag.Title = "Code Camp | Volunteers";
    }
    if (@Model != null)
    {
        if (!string.IsNullOrWhiteSpace(@Model.EventShortName))
        {
            indexPartial = @Model.EventShortName + "/IndexPartial";
        }
    }
}

<div>
    <h2>Code Camp is a volunteer driven event</h2>
    <h3>Code Camps are by and for the developer community at large.</h3>
    <br />
    <h2>Thanks to:</h2>
    <h4>All of the volunteer @Html.ActionLink("Presenters", "Index", "Presenters", new { eventName = @Model.EventShortName }, null), without whom we could not hold the event.</h4>
</div>
@if (!string.IsNullOrWhiteSpace(indexPartial))
{
    if (DateTime.Now < @Model.EventStartDate.AddDays(7))
    {
        <br />
        <h4>These volunteers who are making major contributions to the behind-the-scenes work that makes @Model.EventDisplayName possible!</h4>
    }
    else
    {
        <h4>These volunteers who made major contributions to the behind-the-scenes work that makes @Model.EventDisplayName possible!</h4>
    }
    <div>
    @Html.Partial(indexPartial, Model)
    </div>
}
else
{
    if (DateTime.Now < @Model.EventStartDate.AddDays(7))
    {
        <br />
        <h4>The volunteers who are making major contributions to the behind-the-scenes work that makes @Model.EventDisplayName possible!</h4>
    }
    else
    {
        <h4>The volunteers who made major contributions to the behind-the-scenes work that made @Model.EventDisplayName possible!</h4>
    }
}

@section sidebar {
    @Html.Partial("SidebarCommonPartial")
}
